<div class="business_box add_business_box">
	<div class="list" @if($type != 'business') style="display: none;" @endif>
		<i>*</i><span>商家名称</span>
		<input id="business" type="text" maxlength="12" placeholder="请输入商家名称" value="{{ $map->business->name or '' }}">
	</div>
	<div class="list" @if(!in_array($type, ['business','activity'])) style="display: none;" @endif>
		<i>*</i><span>选择活动</span>
		<label for="" class="activity">
			@forelse($activitys as $activity)
			@if($loop->first)
				@if(isset($map) && ($action=='edit' || $type == 'type'))
				<span id="activity" data-id="{{$map->activity->id}}">{{$map->activity->name}}</span>
				@else
				<span id="activity" data-id="">选择活动</span><i></i>
				@endif
			<ul>
			@endif
				<li data-id="{{$activity->id}}" title="{{$activity->name}}">{{$activity->name}}</li>
			@if($loop->last)
			</ul>
			@endif
			@empty
			<span>暂无活动</span><i></i>
			@endforelse
		</label>
		<a href="{{ url('/activitys') }}">
			<img src="../img/add_active.png" alt="">
		</a>
	</div>
	<div class="list">
		<i>*</i><span>选择渠道</span>
		<label for="">
			@forelse($types as $item)
			@if($loop->first)
				@if(isset($map) && $action=='edit')
				<span id="type" data-id="{{$map->type->id}}">{{$map->type->name}}</span>
				@else
				<span id="type" data-id="">选择渠道</span><i></i>
				@endif
			<ul>
			@endif
				<li data-id="{{$item->id}}" title="{{$item->name}}">{{$item->name}}</li>
			@if($loop->last)
			</ul>
			@endif
			@empty
			<span>暂无渠道</span><i></i>
			@endforelse
		</label>
		<a href="{{ url('/types') }}">
			<img src="../img/add_button.png" alt="">
		</a>
	</div>
	<div class="dialog_button">
		<button class="true" data-id="{{$map->id or ''}}" data-type="{{$type}}" data-action="{{$action}}">确定</button>
		<button class="cancel">取消</button>
	</div>
</div>

